Repository navigation
Print the timeline report's window in the reader's zone, not the host's - #2621
Merged
Merged
Conversation
The digest formatted the window with the host process's clock while the panel header above the Copy button used the browser's, so a Shanghai reader behind a UTC host copied a report that disagreed with the header. The panel now names its own browser zone with the request, and the host formats the window hours and the (+N day) suffix in that zone, keeping its own clock when the zone is missing or unusable. Refs #2619
Collaborator
Author
|
Verdict: PASS at c7d77e4 Ran at this tip: Review points:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Written-by: Dev
Fixes #2619
Owner: Dev
Reviewer: Reviewer
What changed
The timeline report printed the window's hours in the Bot host process's zone, while the panel header above the Copy button printed the browser's: a Shanghai reader behind a UTC host copied a report saying
15:30–16:30under a header saying23:30–00:30. The panel now sends its browser zone (Intl.DateTimeFormat().resolvedOptions().timeZone, the same objectfmtClockreads) with the digest request, and the host formats the window hours and the(+1 day)day boundary in that zone.buildDigest(window, { title, now, timeZone })takes HH:MM and the calendar day from the named zone; a zone that is not a non-empty string the runtime accepts leaves today's host-clock behaviour untouched and never throws. Day differences come from that zone's own Y/M/D, so a DST day is still one day and only a window crossing the reader's midnight gets(+1 day).plugins/timeline/src/timeline.jspassesbody.timeZonethrough only when it is a trimmed non-empty string of at most 64 characters;window(), the recorder, OTLP export, the alerts fold and every other number in the report are unchanged.plugins/timeline/test/digest.test.jspins the window2026-11-06T15:30Z–16:30Z: UTC15:30–16:30,Asia/Shanghai23:30–00:30 (+1 day),America/New_York10:30–11:30,Mars/Olympusfalls back to the host clock without throwing, and notimeZonekeeps the report byte for byte. The same tests fail on the base source (the red proof below).docs/subsystems/timeline.mdrecords that the panel sends its own zone, andchangelog.d/2619.fixed.mdcarries the user-facing note.Ran at this tip: c7d77e4
Not run, and why: full
npm run verify(the brief scopes this to the target tests plus the checks above);build-client.mjs --check(core/client.jsis generated fromcore/src/client/and neither is in this diff); smoke test, pack check, actionlint (nocore/, workflow or packaging change).check-arch-docs.mjsneedsorigin/mainand this box has no git; the owned pagedocs/subsystems/timeline.mdis updated in this diff.Checkpoint
{ "pr": 2621, "claim": "Dev", "issue": 2619, "summary": "Window hours in the timeline report now come from the reader's browser zone, which the panel sends with the digest request, instead of the Bot host's process zone. buildDigest formats the hours and the (+N day) boundary from that zone's own Y/M/D parts, keeps today's host-clock answer when the zone is missing or unusable, and never throws. A window crossing the reader's midnight now says +1 day on any host. window(), the recorder, OTLP export and the alerts fold are unchanged; the subsystem page and a changelog fragment record it.", "files": [ "plugins/timeline/src/digest.js", "plugins/timeline/src/timeline.js", "plugins/timeline/client.js", "plugins/timeline/test/digest.test.js", "plugins/timeline/test/panel.test.js", "changelog.d/2619.fixed.md", "docs/subsystems/timeline.md" ], "checks": { "ran": "TZ=UTC node --test test/digest.test.js (22 pass); TZ=UTC node --import ./test/resolve.mjs --test test/*.test.js (152 pass); oxlint src test; changelog.mjs check; ds-bot-patches.mjs check", "result": "green", "at": "c7d77e49437b0e7c46c60165f5e82c68b2a53c8c" }, "next": "none — ready for review at this tip" }